import { App } from "vue";
import {useUserStore} from "@/store/model/user"
export const regPerssion=(app:App<Element>)=>{
app.directive("permission",{
    // 钩子函数
    mounted(el,binding){
        const userStore = useUserStore()
        console.log("自定义指令",el,binding);
        if(!userStore.getPermitions.includes(binding.value)){
            el.remove()
        }
    }
})
}